﻿<UserControl x:Class="DarklandsUiCommon.Views.Character.FormulaeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:models="clr-namespace:DarklandsUiCommon.Models"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" DataContext="">
    <Grid>
        <ListView ItemsSource="{Binding Formulae}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Formula Name">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate DataType="models:FormulaModel">
                                <TextBlock Margin="-6 -3 -6 -3" Text="{Binding Type}" ToolTip="{Binding Description}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

                    <GridViewColumn Header="Q25">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate DataType="models:FormulaModel">
                                <CheckBox Margin="-1 -3 -1 -3" IsChecked="{Binding HasQuality25}"
                                          ToolTip="{Binding Quality25Tip}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

                    <GridViewColumn Header="Q35">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate DataType="models:FormulaModel">
                                <CheckBox Margin="-1 -3 -1 -3" IsChecked="{Binding HasQuality35}"
                                          ToolTip="{Binding Quality35Tip}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

                    <GridViewColumn Header="Q45">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate DataType="models:FormulaModel">
                                <CheckBox Margin="-1 -3 -1 -3" IsChecked="{Binding HasQuality45}"
                                          ToolTip="{Binding Quality45Tip}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

                    <GridViewColumn Header="Description">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate DataType="models:FormulaModel">
                                <TextBlock Margin="-6 -3 -6 -3" Text="{Binding Description}" FontWeight="Light" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

                </GridView>

            </ListView.View>

        </ListView>

    </Grid>
</UserControl>